await loadScript()
await loadStyle()

export function loadScript() {
  return new Promise((resolve, reject) => {
    const script = document.createElement('script')
    script.src = '#SCRIPT#'
    script.addEventListener('load', resolve)
    script.addEventListener('error', reject)
    document.body.append(script)
  })
}

export function loadStyle() {
  return new Promise((resolve, reject) => {
    const link = document.createElement('link')
    link.rel = 'stylesheet'
    link.href = '#STYLE#'
    link.addEventListener('load', resolve)
    link.addEventListener('error', reject)
    document.body.append(link)
  })
}
